#include <stdio.h>
char list[65536];

int main(int argc, char const *argv[])
{
    char *p = list, c;
    int w = 0, l = 0, floor;
    
    do
    {
        scanf("%c", &c);
        if (c != '\n')
        {
            *p = c;
            p++;
        }
    } while (c != 'E');

    p = list;
    floor = 11;
    while (*p != 'E')
    {
        if (*p == 'W')
        {
            w++;
        }
        else if (*p == 'L')
        {
            l++;
        }
        
        if (w == floor - 1 && l == floor - 1)
        {
            floor++;
        }

        if (w == floor || l == floor)
        {
            printf("%d:%d\n", w, l);
            w = l = 0;
            floor = 11;
        }
        p++;
    }
    printf("%d:%d\n", w, l);
    printf("\n");
    p = list;
    w = l = 0;
    floor = 21;
    while (*p != 'E')
    {
        if (*p == 'W')
        {
            w++;
        }
        else if (*p == 'L')
        {
            l++;
        }
        if (w == floor - 1 && l == floor - 1)
        {
            floor++;
        }
        if (w == floor || l == floor)
        {
            printf("%d:%d\n", w, l);
            w = l = 0;
            floor = 21;
        }
        p++;
    }
    printf("%d:%d\n", w, l);
    return 0;
}
